<?php

namespace User\Repository;

class InMemoryRoleRepository implements RoleRepository {
    private $rolesTree; // array: parent => array(children)

    public function __construct($rolesTree) {
        $this->rolesTree = $rolesTree;
    }

    public function getRoles() {
        return array_keys($this->rolesTree);
    }
    
    public function getRolesTree() {
        return $this->rolesTree;
    }
}